import { ref } from "vue";

let defaultObj = {
    name: '张三',
    children: {
        name: '张三'
    }
};
export const obj = ref(JSON.parse(JSON.stringify(defaultObj)));
export const setProp = () => {
    obj.value.age = 'ref age 15';
};
export const setObjDefault = () => {
    obj.value = JSON.parse(JSON.stringify(defaultObj));
};
export const deleteProp = () => {
    delete obj.value.children.name;
};
export const inHandler = () => {
    obj.value.inHandler = ('name' in obj.value)
};